import { Element } from '../../../fieldType'
import commonField from '../../../propertyPanel/commonConfig'
export interface TextElement extends Element {
  hint: string
  dateType: number
  defaultValue: string
  width: number
  defaultType: number
}
function formListFactory () {
  return [
    commonField.name,
    commonField.attrCode,
    { label: '日期类型', name: 'dateType', type: 'select', data: [{ label: '年月日', value: 1 }, { label: '年月日时分秒', value: 2 }] },
    { label: '默认值', name: 'defaultType', type: 'select', data: [{ label: '无', value: 1 }, { label: '当前时间', value: 2 }] },
    commonField.hint,
    commonField.width
  ]
}
const formList = formListFactory()
const formTemplate: TextElement = {
  attrCode: '',
  businessId: '',
  name: '日期',
  fieldType: 'dateTime',
  hint: '',
  dateType: 1,
  defaultValue: '',
  defaultType: 1,
  width: 1
}
export default {
  formList,
  formTemplate
}
